home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
apps
/
math
/
ols.zoo
/
makefile
< prev
next >
Wrap
Makefile
|
1993-04-16
|
3KB
|
131 lines
# You have to setup two things:
#
# 1. Setting up for your (ANSI) C compiler:
# Configuring this for your C compile consists of (somehow)
# setting up the variables CC and CFLAGS. I have supplied
# variables GCC+GCCFLAGS (which work with gcc) and
# variables LCC+LCCFLAGS (which work with Lucid C v2.0 for SPARC).
#
# If your C doesn't have a stdlib.h, a minimal replacement is
# in the file stdlib.replacement. Just mv it to ./stdlib.h
# and all should be well.
#
# 2. Directory assumptions:
# Next, setup directories BINDIR and MANDIR. These are _only_ used
# when you say "make install". MANDIR is the place where
# troff man pages are kept.
GCC = gcc
GCCFLAGS = -O2
LCC = lcc
LCCFLAGS = -XA -O4 -I.
CC = $(GCC)
CFLAGS = $(GCCFLAGS)
BINDIR = /usr/local/bin
MANDIR = /usr/man/man1
# Makefile should not need any changes from here onwards.
# ---------------------------------------------------------------------------
SRCLIST = f.c \
t.c \
fatal.c \
ran1.c \
misc.c \
split.c \
loadfile.c \
multiply.c \
lustuff.c \
ols.c \
olse.c \
pretty.c \
matalloc.c \
matfree.c \
valloc.c \
vfree.c
OLIST = $(SRCLIST:%.c=%.o)
ols.ttp : $(OLIST) Makefile
$(CC) $(CFLAGS) -o ols.ttp $(OLIST) -lpml
# xstrip ols.ttp
# Didn't write a simple make rule because I'm not sure what
# aspects of Sun make are non-portable.
f.o : f.c
$(CC) $(CFLAGS) -c f.c
t.o : t.c
$(CC) $(CFLAGS) -c t.c
fatal.o : fatal.c
$(CC) $(CFLAGS) -c fatal.c
ran1.o : ran1.c
$(CC) $(CFLAGS) -c ran1.c
misc.o : misc.c
$(CC) $(CFLAGS) -c misc.c
split.o : split.c
$(CC) $(CFLAGS) -c split.c
loadfile.o : loadfile.c
$(CC) $(CFLAGS) -c loadfile.c
multiply.o : multiply.c
$(CC) $(CFLAGS) -c multiply.c
lustuff.o : lustuff.c
$(CC) $(CFLAGS) -c lustuff.c
olse.o : olse.c
$(CC) $(CFLAGS) -c olse.c
pretty.o : pretty.c
$(CC) $(CFLAGS) -c pretty.c
miscstring.o : miscstring.c
$(CC) $(CFLAGS) -c miscstring.c
matalloc.o : matalloc.c
$(CC) $(CFLAGS) -c matalloc.c
matfree.o : matfree.c
$(CC) $(CFLAGS) -c matfree.c
valloc.o : valloc.c
$(CC) $(CFLAGS) -c valloc.c
vfree.o : vfree.c
$(CC) $(CFLAGS) -c vfree.c
ols.o : ols.c
$(CC) $(CFLAGS) -c ols.c
test : ols.ttp
@echo ""
@echo We will now do five tests. Each involves running ols on
@echo your machine and comparing the result against what
@echo is expected.
@echo ""; echo Test \#1\:; echo ""
./ols data.1k > r1
-diff r1 r1.expected
@echo ""; echo Test \#2\:; echo ""
./ols data.1k -l '_constant x1 x2 y' > r2
-diff r2 r2.expected
@echo ""; echo Test \#3\:; echo ""
./ols data.1k -l '_constant x1 x2 y' -m 'y = x2 _constant' > r3
-diff r3 r3.expected
@echo ""; echo Test \#4\:; echo ""
./ols data.1k -l '_constant x1 x2 y' -m 'y = x2 _constant' -p > r4
-diff r4 r4.expected
@echo ""; echo Test \#5\:; echo "";
./ols data.1k -l '_constant x1 x2 y' -m 'y = x2 _constant' -epp > r5
-diff r5 r5.expected
@echo ""
@echo If all these differences were numerically insignificant,
@echo then it is working ok.
clean :
rm -f ols.ttp *.o r?
install : ols.ttp
/bin/cp ols.ttp $(BINDIR)
/bin/cp ols.1 $(MANDIR)